package com.ai.wxy.spring.jpa.test.controller;

import com.ai.spring.common.util.ResponseResult;
import com.ai.spring.common.util.ResponseResultUtil;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 用户测试
 *
 * @author 石头
 * @Date 2019/10/31
 * @Version 1.0
 **/
@RestController
public class UserController {

    @GetMapping("/")
    public ResponseResult<String> index(){
        return ResponseResultUtil.ofSuccess("OK");
    }

    @GetMapping("/admin/index")
    public ResponseResult<String> adminIndex(){
        return ResponseResultUtil.ofSuccess("Admin OK");
    }

    @GetMapping("/user/index")
    public ResponseResult<String> userIndex(){
        return ResponseResultUtil.ofSuccess("User OK");
    }
}
